<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page trimDirectiveWhitespaces="true" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />


<!-- bootstrap & fontawesome -->
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/font-awesome.min.css" />

<!-- page specific plugin styles -->
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/jquery-ui.custom.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/chosen.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap-datepicker3.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap-timepicker.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/daterangepicker.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap-datetimepicker.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap-colorpicker.min.css" />


<!-- ace styles -->
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/ace.min.css"
	id="main-ace-style" />

<!--[if lte IE 9]>
			<link rel="stylesheet" href="<%=request.getContextPath()%>/ace/assets/css/ace-part2.min.css" />
		<![endif]-->
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/ace-skins.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/ace-rtl.min.css" />

<!--[if lte IE 9]>
		  <link rel="stylesheet" href="<%=request.getContextPath()%>/ace/assets/css/ace-ie.min.css" />
		<![endif]-->

<!-- inline styles related to this page -->

<!-- ace settings handler -->
<script
	src="<%=request.getContextPath()%>/ace/assets/js/ace-extra.min.js"></script>

<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

<!--[if lte IE 8]>
		<script src="<%=request.getContextPath()%>/ace/assets/js/html5shiv.min.js"></script>
		<script src="<%=request.getContextPath()%>/ace/assets/js/respond.min.js"></script>
		<![endif]-->
		
<link href="<%=request.getContextPath()%>/static/richeditor/external/google-code-prettify/prettify.css" rel="stylesheet" />
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" />
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.css" rel="stylesheet" />
<link href="<%=request.getContextPath()%>/static/richeditor/css/style.css" rel="stylesheet" />
</head>

<body class="no-skin">
	

	<!-- /section:basics/content.breadcrumbs -->
	<div class="page-content">
		<!-- /section:settings.box -->
		<div class="page-content-area">
			<div class="page-header">
				<h1>
					政策解读编辑 
				</h1>
			</div>
			<!-- /.page-header -->

			<div class="row">
				<div class="col-xs-12">
					<!-- PAGE CONTENT BEGINS -->
					<form id="drizzt-table" class="form-horizontal"
						action="<%=request.getContextPath()%>/bsbPolicy/update"
						method="post">
						<!-- #section:elements.form -->
								<input type="hidden"   name="uuid" value="${bsbPolicy.uuid}"
									class="col-xs-10 col-sm-5" />
								<input type="hidden"   name="queryString" value="${queryString}"
									class="col-xs-10 col-sm-5" />
								<div class="form-group">
									<label class="col-sm-1 control-label no-padding-right"
										for="form-field-1"> 标题 </label>
		
									<div class="col-sm-9">
										<input type="text"   placeholder="title"
											name="title" value="${bsbPolicy.title}"
											class="col-xs-10 col-sm-5" />
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-1 control-label no-padding-right"
										for="form-field-1"> 原文</label>
		
									<div class="col-sm-9">
											<input type="hidden" name="content" id="content" value='${bsbPolicy.content }'/>
											<div id="wang1">
											</div>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-1 control-label no-padding-right"
										for="form-field-1">专家解读</label>
		
									<div class="col-sm-9">
											<input type="hidden" name="expert" id="expert" value='${bsbPolicy.expert }'/>
											<div id="wang2"><p></p></div>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-1 control-label no-padding-right"
										for="form-field-1"> 官方解读</label>
		
									<div class="col-sm-9">
											<input type="hidden" name="official" id="official" value='${bsbPolicy.official }'/>
											<div id="wang3"><p></p></div>
									</div>
								</div>
								
								
								
								
								
								
						<div class="clearfix form-actions">
							<div class="col-md-offset-3 col-md-9">
								<input  class="btn btn-info" type="button" id="btn1" value="提交" />

								&nbsp; &nbsp; &nbsp;
								<input  class="btn btn-info" type="button" onclick="location.href='<%=request.getContextPath()%>/bsbPolicy/list.do'" value="返回" />
							</div>
						</div>
					</form>

					<!-- PAGE CONTENT ENDS -->
				</div>
				<!-- /.col -->
			</div>
			<!-- /.row -->
		</div>
		<!-- /.page-content-area -->
	</div>
	<!-- /.page-content -->
</body>

<!-- basic scripts -->

<!--[if !IE]> -->
<script type="text/javascript">
	window.jQuery
			|| document
					.write("<script src='<%=request.getContextPath()%>/ace/assets/js/jquery.min.js'>"
							+ "<"+"/script>");
</script>

<!-- <![endif]-->

<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='<%=request.getContextPath()%>/ace/assets/js/jquery1x.min.js'>"+"<"+"/script>");
</script>
<![endif]-->
<script type="text/javascript">
	if ('ontouchstart' in document.documentElement)
		document.write("<script src='<%=request.getContextPath()%>/ace/assets/js/jquery.mobile.custom.min.js'>"+ "<"+"/script>");
</script>

<script
	src="<%=request.getContextPath()%>/ace/assets/js/bootstrap.min.js"></script>



<script type="text/javascript" src="<%=request.getContextPath()%>/static/js/wangEditor.js"></script>
    <script type="text/javascript">
        var E = window.wangEditor

        var editor1 = new E('#wang1')
		editor1.customConfig.uploadImgShowBase64 = true
        editor1.create()
        editor1.txt.html($("#content").val())

        var editor2 = new E('#wang2')
		editor2.customConfig.uploadImgShowBase64 = true
		editor2.customConfig.pasteFilterStyle = true
        editor2.create()
        editor2.txt.html($("#expert").val())
        
        var editor3 = new E('#wang3')
		editor3.customConfig.uploadImgShowBase64 = true
		editor3.customConfig.pasteFilterStyle = true
        editor3.create()
        editor3.txt.html($("#official").val())
        
        document.getElementById('btn1').addEventListener('click', function () {
		        // 读取 html
		        $("#content").val(editor1.txt.html());
		        $("#expert").val(editor2.txt.html());
		        $("#official").val(editor3.txt.html());
				$("#drizzt-table").submit();
		    }, false)
    </script>
</html>
